import React from 'react';
import Modals from '@/components/modals/Modals';
import { ModalProps } from 'antd';

interface Props extends ModalProps {
  open: boolean;
  onOk: () => void;
  onCancel: () => void;
  repetition: number;
}

const RepetitionModal = ({ open, repetition, ...props }: Props) => {
  return (
    <Modals
      {...props}
      open={open}
      title={'数据重复'}
      okText={'覆盖旧数据'}
      cancelText={'仅添加新数据'}
      closable={false}
    >
      <div className="mb-14 mt-6 text-center text-sm">
        检测到
        <span className="text-[#FF0E0E]">{repetition}条重复数据</span>
      </div>
    </Modals>
  );
};

export default RepetitionModal;
